import { get, post } from '@/utils/request';
class CamperApi {
  /**
   * @description 获取营员列表
   * @returns {Promise<any>}
   */
  static getCamperList() {
    return get('/biz/capi/camper/list')
  }
  /**
   * @description 添加营员
   * @returns {Promise<any>}
   */
  static addCamper(camperItem: any) {
    return post('/biz/capi/camper/add', camperItem)
  }
  /**
   * @description 删除营员
   * @returns {Promise<any>}
   */
  static delCamper(camperIds:Array<string>) {
    return post('/biz/capi/camper/del',{camperIds})
  }
  /**
   * @description 更新营员
   * @param camperId 营员id
   * @returns {Promise<any>}
   */
  static updateCamper(camperItem: any) {
    return post(`/biz/capi/camper/update/${camperItem.id}`, camperItem)
  }
  /**
   * @description 验证营队券
   * @returns {Promise<any>}
   */
  static checkCampCoupon(param:any){
    return post('/biz/capi/order/checkCampCoupon',param)
  }
  /**
   * @description 获取营队列表
   * @returns {Promise<any>}
   */
  static getMeetLocationList(campId:string|number){
    return get(`/biz/capi/camp/getMeetLocation/${campId}`,{campId})
  }
}
export default CamperApi;